<!--河南星辰软件科技有限公司
@copyright Copyright (c) 2010~2022 All rights reserved.
-->
<template>
  <div class='app-container'>
    <el-row>
      <el-col :span='22' :xs='24'>
        <el-menu default-active='active' mode='horizontal' class='menu-unit'>
          <el-menu-item v-for='item in Container2' :index="'附属信息'===item.name?'active':'default'">
            <el-link @click="gotoMenu(item.url)" :type="'附属信息'===item.name?'primary':'default'">{{item.page_desc||item.name}}</el-link>
          </el-menu-item>
        </el-menu>
        <table cellpadding="4" cellspacing="0" border="0" width="100%">
          <tr>
            <td class="containerBack">
              <el-form ref="form" :model="s_quality" :rules="rules" label-width="100px" id="mvcfm">
                <div class="form-unit">
                  <span class="mvc-title-left"> 企业资质 </span>
                </div>
                <el-table :data="s_quality">
                  <el-table-column label="类型" prop="quality_type">
                  </el-table-column>
                  <el-table-column label="资质文件" prop="version_id">
                    <template slot-scope="scope">
                    </template>
                  </el-table-column>
                  <el-table-column label="证书编号" prop="quality_num">
                  </el-table-column>
                  <el-table-column label="资质验证" prop="verify_type">
                  </el-table-column>
                  <el-table-column label="资质查询网站" prop="verify_url">
                    <template slot-scope="scope">
                      <el-link href="gotoPage('http://'+emt.map['verify_url']+'')" type='primary'>{{scope.row.verify_url}}</el-link>
                    </template>
                  </el-table-column>
                </el-table>
                <div class="form-unit">
                  <span class="mvc-title-left"> 银行账户信息 </span>
                </div>
                <el-table :data="s_bank_account">
                  <el-table-column label="类型" prop="account_type">
                  </el-table-column>
                  <el-table-column label="开户银行" prop="bank_name">
                  </el-table-column>
                  <el-table-column label="开户名称" prop="account_name">
                  </el-table-column>
                  <el-table-column label="银行账户" prop="bank_account">
                  </el-table-column>
                </el-table>
              </el-form>
            </td>
          </tr>
        </table>
      </el-col>
      <el-col :span='2' :xs='24'>
        <el-menu default-active='active' class='menu-unit'>
          <el-menu-item v-for='item in Container'>
            <el-link @click="gotoMenu(item.url)" :type="'供应商'===item.name?'primary':'default'">{{item.page_desc||item.name}}</el-link>
          </el-menu-item>
        </el-menu>
      </el-col>
    </el-row>
  </div>
</template>
<script>
  import request from '@/utils/request'
  export default {
    name: 'SubsidiaryInformation',
    components: {},
    props: ['popparams'],
    data() {
      return {
        vueparams: this.getVUEParams(""),
        s_quality: [],
        s_bank_account: [],
        loading: false,
        Container: null,
        Container2: null,
        rules: {}
      }
    },
    created() {
      this.getData();
      this.loadContainerMenu({
        pid: "821959E4C08E497BA9C4B10D9571712F",
        name: "采购任务右菜单",
        selected: "供应商"
      }, 'Container', this.vueparams);
      this.loadContainerMenu({
        pid: "821959E4C08E497BA9C4B10D9571712F",
        name: "供应商详情",
        selected: "附属信息"
      }, 'Container2', this.vueparams);
    },
    updated() {},
    mounted() {},
    methods: {
      getData() {
        request({
          method: 'get',
          url: '/xcapi/VUEAction/psi/supplychainmana/ProcureSupplyAction/subsidiaryInformation?' + this.vueparams,
        }).then(data => {
          for (var k in data) {
            if (Array.isArray(data[k])) {
              this[k] = data[k];
            } else {
              $.extend(this[k], data[k]);
            }
          }
        })
      },
      d_quality(_params) {
        request({
          method: 'post',
          url: '/xcapi/VUEAction/psi/supplychainmana/ProcureSupplyAction/d_quality?' + _params + this.vueparams,
          data: this.postData()
        }).then(data => {
          this.$router.replace("/redirect" + this.$route.fullPath);
          this.msgSuccess(data.msg);
        })
      },
      d_bank_account(_params) {
        request({
          method: 'post',
          url: '/xcapi/VUEAction/psi/supplychainmana/ProcureSupplyAction/d_bank_account?' + _params + this.vueparams,
          data: this.postData()
        }).then(data => {
          this.$router.replace("/redirect" + this.$route.fullPath);
          this.msgSuccess(data.msg);
        })
      },
    },
  }
</script>
